//
//  NotBindingDeviceView.swift
//  DaRings
//
//  Created by 易先生 on 2022/10/28.
//

import UIKit
import MYModule

class MyHomeUnDeviceContainerView: View {

    override func makeUI() {
        super.makeUI()
        
        self.addSubview(noDeviceTip)
        self.addSubview(addButton)
        self.addSubview(lineView)

        noDeviceTip.snp.makeConstraints { make in
            make.top.leading.trailing.equalToSuperview()
        }
        
        addButton.snp.makeConstraints { make in
            make.top.equalTo(noDeviceTip.snp.bottom).offset(36)
            make.trailing.equalToSuperview()
            make.bottom.equalToSuperview().offset(-20)
        }
        
        lineView.snp.makeConstraints { make in
            make.leading.trailing.bottom.equalToSuperview()
            make.height.equalTo(1)
        }
    }
    
    private lazy var noDeviceTip:Label = {
        let noDeviceTip = Label()
        noDeviceTip.text = "device_add_smart_ring_info".language
        noDeviceTip.numberOfLines = 0
        noDeviceTip.adjustsFontSizeToFitWidth = true
        noDeviceTip.textColor = UIColor.assist_222222
        noDeviceTip.font = Fonts.main_title(.semibold)
        return noDeviceTip
    }()
    
    public lazy var addButton: BaseButton = {
        let addButton = BaseButton(type: .custom)
        addButton.backgroundColor = UIColor.theme
        addButton.cornerRadius = 18
        addButton.setTitle("device_add_btn_title".language, for: .normal)
        addButton.setTitleColor(UIColor.assist_FFFFFF, for: .normal)
        addButton.titleLabel?.font = Fonts.boldSystemFont(ofSize: 12)
        addButton.contentEdgeInsets = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
        return addButton
    }()
    
    private lazy var lineView: View = {
        let lineView = View()
        lineView.backgroundColor = UIColor.assist_D0D0D0
        return lineView
    }()

}
